package org.mags.rema.model.provider;

// Generated Dec 6, 2009 5:47:57 PM by Hibernate Tools 3.2.2.GA
// powered by BTS-GT

import java.io.Serializable; 

import org.mags.dao.provider.AbstractCacheableDataProvider;
import org.mags.rema.model.entity.EntityStatus;

public class EntityStatusProvider extends AbstractCacheableDataProvider<EntityStatus> {
	private static final long serialVersionUID = 1L;
	public EntityStatus getByCode(String code) {
		for(EntityStatus i: getAll()) {
			if(code.equalsIgnoreCase(i.getCode()))
				return i;
		}
		return null;
	}
	public EntityStatus getById(Serializable id) {
		for(EntityStatus i: getAll()) {
			if(i.getEntityStatusId()==((Number)id).intValue())
				return i;
		}
		return null;
	}
	protected void loadProperties(EntityStatus[] all) {		
	}	
}
